IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[trg_tr_File]'))
DROP TRIGGER [dbo].[trg_tr_File]
GO


CREATE TRIGGER dbo.trg_tr_File 
   ON  dbo.tr_File 
   AFTER UPDATE
AS 
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	DECLARE @FileId UNIQUEIDENTIFIER
	SET @FileId = (SELECT FileId FROM inserted)

    UPDATE 
		tr_File
	SET
		LastUpdatedDt = GETDATE()
	WHERE 
		FileId = @FileId

END
GO
